<template>
  <Page>
    <h1>Home Page</h1>
    <p>This is the Home page11111111111.</p>
    <el-button @click="setTokenTime()">设置token过期</el-button>
    <el-button @click="$ToPath('/about')">Go to About</el-button>
  </Page>
</template>

<script setup>
import Page from '@/components/page/index'
import { getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
const setTokenTime = () => {
  const authDataStr = localStorage.getItem('authData')
  const authData = JSON.parse(authDataStr)
  authData.expires = Date.now() - 1
  localStorage.setItem('authData', JSON.stringify(authData))
}
</script>
